
const path = require("path");
// const html_webpack_plugin = require("html-webpack-plugin");
const vue_loader_plugin = require("vue-loader/lib/plugin");

module.exports={
    mode: "development",
    entry: path.join(__dirname, "./src/main.js"),
    output:{
        path: path.join(__dirname, "./dist"),
        filename : "bundle.js"
    },
    module:{
        rules:[
            {test: /\.css$/, use: ["style-loader", "css-loader"]},
            {test: /\.less$/, use: ["style-loader", "css-loader", "less-loader"]},
            {test: /\.(jpg|png|gif|bmp|jpeg)$/, use: "url-loader"},
            {test: /\.(ttf|eot|svg|woff|woff2)$/, use: "url-loader"},
            {test: /\.js$/, exclude: /node_modules/, use: "babel-loader"},
            {test: /\.vue$/, loader:"vue-loader"}
        ]
    },
    plugins:[
    // new html_webpack_plugin(),
    new vue_loader_plugin()
    ],
    resolve:{
        alias:{
            "vue$":"vue/dist/vue.js"
        }
    }
}